Skip to content

feat(anstyle-svg): add HTML rendering#258

Merged
epage merged 2 commits intorust-cli:mainfrom
Urgau:html_rendering
Jun 16, 2025
Merged

feat(anstyle-svg): add HTML rendering#258
epage merged 2 commits intorust-cli:mainfrom
Urgau:html_rendering

Conversation

@Urgau
Copy link
Copy Markdown
Contributor

@Urgau Urgau commented Jun 16, 2025

This PR adds HTML rendering of ANSI escape codes to the anstyle-svg crate.

This was originally implemented in my community fork anstyle-html.

Since SVG and HTML are very close, the implementation is extremely similar, to the point where only the main function render_svg is touched.

Fixes #256

Comment thread crates/anstyle-svg/src/lib.rs
@epage
Copy link
Copy Markdown
Collaborator

epage commented Jun 16, 2025

For the "spelling" issues, we currently prevent the spell checking of svg files to work around that, see https://github.com/rust-cli/anstyle/blob/main/typos.toml

Since we shouldn't have human created HTML files, maybe we can just do the same for now?

@coveralls
Copy link
Copy Markdown

coveralls commented Jun 16, 2025

Pull Request Test Coverage Report for Build 15692504847

Details

  • 99 of 100 (99.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+1.1%) to 53.709%

Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/anstyle-svg/src/lib.rs 99 100 99.0%
Files with Coverage Reduction New Missed Lines %
crates/anstyle/src/effect.rs 1 41.94%
Totals Coverage Status
Change from base Build 15450129892: 1.1%
Covered Lines: 1390
Relevant Lines: 2588

💛 - Coveralls

@epage epage merged commit 2447454 into rust-cli:main Jun 16, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upstreaming of community fork anstyle-html

3 participants